package com.blue.base.common.enums;

/**
 * 公共状态
 *
 * @author liulei,lei
 * @version 1.0
 */
public enum CommonStatus {

    /**
     * 通用
     */
    ENABLE(1, "启用"),
    DISABLE(2, "禁用");

    Integer code;
    String message;

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    CommonStatus(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public static CommonStatus getDescription(Integer code) {
        for (CommonStatus s : CommonStatus.values()) {
            if (s.getCode().equals(code)) {
                return s;
            }
        }
        return null;
    }
}
